package com.crr.mall.ware.dao;

import com.crr.mall.ware.entity.PurchaseEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 采购信息
 * 
 * @author chenrenren
 * @email chenrenren@gmail.com
 * @date 2024-11-22 20:37:24
 */
@Mapper
public interface PurchaseDao extends BaseMapper<PurchaseEntity> {
    /**
     * 查询采购信息
     * @param map
     * @return
     */
    List<Map> queryByCondition(Map map);

    /**
     * 新增采购单
     * @param purchaseEntity
     * @return
     */
    int savePurchase(PurchaseEntity purchaseEntity);

    /**
     * 查询采购单 后续有可能加个人的采购单
     * @return
     */
    List<PurchaseEntity> findPurchase(@Param("ids") List<Long> ids);

    /**
     * 修改采购单状态
     * @param id
     * @return
     */
    int updateStatus(Long id);
}
